3.3.11 \(\int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx\) [211]

3.3.11.1 Optimal result
3.3.11.2 Mathematica [A] (verified)
3.3.11.3 Rubi [A] (verified)
3.3.11.4 Maple [A] (verified)
3.3.11.5 Fricas [A] (verification not implemented)
3.3.11.6 Sympy [F]
3.3.11.7 Maxima [B] (verification not implemented)
3.3.11.8 Giac [A] (verification not implemented)
3.3.11.9 Mupad [B] (verification not implemented)

3.3.11.1 Optimal result

Integrand size = 31, antiderivative size = 117 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 d \left (2 c^2-2 c d+d^2\right ) \text {arctanh}(\sin (e+f x))}{2 a f}+\frac {(c-d) (c+d \sec (e+f x))^2 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (c^2-3 c d+d^2\right )+(2 c-3 d) d \sec (e+f x)\right ) \tan (e+f x)}{2 a f} \]

output
3/2*d*(2*c^2-2*c*d+d^2)*arctanh(sin(f*x+e))/a/f+(c-d)*(c+d*sec(f*x+e))^2*t 
an(f*x+e)/f/(a+a*sec(f*x+e))-1/2*d*(4*c^2-12*c*d+4*d^2+(2*c-3*d)*d*sec(f*x 
+e))*tan(f*x+e)/a/f
 
3.3.11.2 Mathematica [A] (verified)

Time = 1.60 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.67 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 d \left (2 c^2-2 c d+d^2\right ) \text {arctanh}(\sin (e+f x))+2 (c-d)^3 \tan \left (\frac {1}{2} (e+f x)\right )+d^2 (6 c-2 d+d \sec (e+f x)) \tan (e+f x)}{2 a f} \]

input
Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^3)/(a + a*Sec[e + f*x]),x]
 
output
(3*d*(2*c^2 - 2*c*d + d^2)*ArcTanh[Sin[e + f*x]] + 2*(c - d)^3*Tan[(e + f* 
x)/2] + d^2*(6*c - 2*d + d*Sec[e + f*x])*Tan[e + f*x])/(2*a*f)
 
3.3.11.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.84, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {3042, 4475, 109, 25, 27, 164, 45, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a \sec (e+f x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3}{a \csc \left (e+f x+\frac {\pi }{2}\right )+a}dx\)

\(\Big \downarrow \) 4475

\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {(c+d \sec (e+f x))^3}{\sqrt {a-a \sec (e+f x)} (\sec (e+f x) a+a)^{3/2}}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 109

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (-\frac {\int -\frac {a^2 d (3 c-2 d-(2 c-3 d) \sec (e+f x)) (c+d \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{a^3}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}{a^2 \sqrt {a \sec (e+f x)+a}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {\int \frac {a^2 d (3 c-2 d-(2 c-3 d) \sec (e+f x)) (c+d \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{a^3}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}{a^2 \sqrt {a \sec (e+f x)+a}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {d \int \frac {(3 c-2 d-(2 c-3 d) \sec (e+f x)) (c+d \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}{a^2 \sqrt {a \sec (e+f x)+a}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 164

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {d \left (\frac {3}{2} \left (2 c^2-2 c d+d^2\right ) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)+\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} \left (4 \left (c^2-3 c d+d^2\right )+d (2 c-3 d) \sec (e+f x)\right )}{2 a^2}\right )}{a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}{a^2 \sqrt {a \sec (e+f x)+a}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 45

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {d \left (3 \left (2 c^2-2 c d+d^2\right ) \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}+\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} \left (4 \left (c^2-3 c d+d^2\right )+d (2 c-3 d) \sec (e+f x)\right )}{2 a^2}\right )}{a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}{a^2 \sqrt {a \sec (e+f x)+a}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

\(\Big \downarrow \) 218

\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {d \left (\frac {\sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a} \left (4 \left (c^2-3 c d+d^2\right )+d (2 c-3 d) \sec (e+f x)\right )}{2 a^2}-\frac {3 \left (2 c^2-2 c d+d^2\right ) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a \sec (e+f x)+a}}\right )}{a}\right )}{a}-\frac {(c-d) \sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}{a^2 \sqrt {a \sec (e+f x)+a}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\)

input
Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^3)/(a + a*Sec[e + f*x]),x]
 
output
-((a^2*(-(((c - d)*Sqrt[a - a*Sec[e + f*x]]*(c + d*Sec[e + f*x])^2)/(a^2*S 
qrt[a + a*Sec[e + f*x]])) + (d*((-3*(2*c^2 - 2*c*d + d^2)*ArcTan[Sqrt[a - 
a*Sec[e + f*x]]/Sqrt[a + a*Sec[e + f*x]]])/a + (Sqrt[a - a*Sec[e + f*x]]*S 
qrt[a + a*Sec[e + f*x]]*(4*(c^2 - 3*c*d + d^2) + (2*c - 3*d)*d*Sec[e + f*x 
]))/(2*a^2)))/a)*Tan[e + f*x])/(f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[ 
e + f*x]]))
 

3.3.11.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 109
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[(b*c - a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*((e + f 
*x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] + Simp[1/(b*(b*e - a*f)*(m + 1)) 
 Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) 
+ c*f*(p + 1)) + b*c*(d*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) 
 + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /; FreeQ[{a, b, c, 
d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || 
IntegersQ[m, n + p] || IntegersQ[p, m + n])
 

rule 164
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_ 
))*((g_.) + (h_.)*(x_)), x_] :> Simp[(-(a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - 
 b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x))*(a + b*x)^(m + 1)*(( 
c + d*x)^(n + 1)/(b^2*d^2*(m + n + 2)*(m + n + 3))), x] + Simp[(a^2*d^2*f*h 
*(n + 1)*(n + 2) + a*b*d*(n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 
3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*(m + n + 3) + 
d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3))   Int[( 
a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] 
&& NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4475
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a 
^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) 
 Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x 
], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[ 
b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p, 1] || In 
tegerQ[m - 1/2])
 
3.3.11.4 Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.55

method result size
parallelrisch \(\frac {-3 \left (c^{2}-c d +\frac {1}{2} d^{2}\right ) \left (1+\cos \left (2 f x +2 e \right )\right ) d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+3 \left (c^{2}-c d +\frac {1}{2} d^{2}\right ) \left (1+\cos \left (2 f x +2 e \right )\right ) d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) \left (\left (c^{3}-3 c^{2} d +6 c \,d^{2}-2 d^{3}\right ) \cos \left (2 f x +2 e \right )+\left (6 c \,d^{2}-d^{3}\right ) \cos \left (f x +e \right )+c^{3}-3 c^{2} d +6 c \,d^{2}-d^{3}\right )}{a f \left (1+\cos \left (2 f x +2 e \right )\right )}\) \(181\)
derivativedivides \(\frac {c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}-d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}}{f a}\) \(208\)
default \(\frac {c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-3 c^{2} d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2}-d^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {d^{3}}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}-\frac {3 d^{2} \left (2 c -d \right )}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}}{f a}\) \(208\)
norman \(\frac {\frac {\left (c^{3}-3 c^{2} d +3 c \,d^{2}-d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}+\frac {\left (3 c^{3}-9 c^{2} d +21 c \,d^{2}-7 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a f}-\frac {3 \left (c^{3}-3 c^{2} d +5 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}-\frac {\left (c^{3}-3 c^{2} d +9 c \,d^{2}-2 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}-\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2 a f}+\frac {3 d \left (2 c^{2}-2 c d +d^{2}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2 a f}\) \(245\)
risch \(\frac {i \left (2 c^{3} {\mathrm e}^{4 i \left (f x +e \right )}-6 c^{2} d \,{\mathrm e}^{4 i \left (f x +e \right )}+6 c \,d^{2} {\mathrm e}^{4 i \left (f x +e \right )}-3 d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+6 c \,d^{2} {\mathrm e}^{3 i \left (f x +e \right )}-3 d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+4 c^{3} {\mathrm e}^{2 i \left (f x +e \right )}-12 c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}+18 c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-5 d^{3} {\mathrm e}^{2 i \left (f x +e \right )}+6 c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-d^{3} {\mathrm e}^{i \left (f x +e \right )}+2 c^{3}-6 c^{2} d +12 c \,d^{2}-4 d^{3}\right )}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{2}}-\frac {3 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c^{2}}{a f}+\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c}{a f}-\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{2 a f}+\frac {3 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c^{2}}{a f}-\frac {3 d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c}{a f}+\frac {3 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{2 a f}\) \(382\)

input
int(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x,method=_RETURNVERBOSE 
)
 
output
(-3*(c^2-c*d+1/2*d^2)*(1+cos(2*f*x+2*e))*d*ln(tan(1/2*f*x+1/2*e)-1)+3*(c^2 
-c*d+1/2*d^2)*(1+cos(2*f*x+2*e))*d*ln(tan(1/2*f*x+1/2*e)+1)+tan(1/2*f*x+1/ 
2*e)*((c^3-3*c^2*d+6*c*d^2-2*d^3)*cos(2*f*x+2*e)+(6*c*d^2-d^3)*cos(f*x+e)+ 
c^3-3*c^2*d+6*c*d^2-d^3))/a/f/(1+cos(2*f*x+2*e))
 
3.3.11.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.85 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {3 \, {\left ({\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left ({\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{3} + {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (d^{3} + 2 \, {\left (c^{3} - 3 \, c^{2} d + 6 \, c d^{2} - 2 \, d^{3}\right )} \cos \left (f x + e\right )^{2} + {\left (6 \, c d^{2} - d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{4 \, {\left (a f \cos \left (f x + e\right )^{3} + a f \cos \left (f x + e\right )^{2}\right )}} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="fri 
cas")
 
output
1/4*(3*((2*c^2*d - 2*c*d^2 + d^3)*cos(f*x + e)^3 + (2*c^2*d - 2*c*d^2 + d^ 
3)*cos(f*x + e)^2)*log(sin(f*x + e) + 1) - 3*((2*c^2*d - 2*c*d^2 + d^3)*co 
s(f*x + e)^3 + (2*c^2*d - 2*c*d^2 + d^3)*cos(f*x + e)^2)*log(-sin(f*x + e) 
 + 1) + 2*(d^3 + 2*(c^3 - 3*c^2*d + 6*c*d^2 - 2*d^3)*cos(f*x + e)^2 + (6*c 
*d^2 - d^3)*cos(f*x + e))*sin(f*x + e))/(a*f*cos(f*x + e)^3 + a*f*cos(f*x 
+ e)^2)
 
3.3.11.6 Sympy [F]

\[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {c^{3} \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {3 c^{2} d \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))**3/(a+a*sec(f*x+e)),x)
 
output
(Integral(c**3*sec(e + f*x)/(sec(e + f*x) + 1), x) + Integral(d**3*sec(e + 
 f*x)**4/(sec(e + f*x) + 1), x) + Integral(3*c*d**2*sec(e + f*x)**3/(sec(e 
 + f*x) + 1), x) + Integral(3*c**2*d*sec(e + f*x)**2/(sec(e + f*x) + 1), x 
))/a
 
3.3.11.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 388 vs. \(2 (114) = 228\).

Time = 0.22 (sec) , antiderivative size = 388, normalized size of antiderivative = 3.32 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=-\frac {d^{3} {\left (\frac {2 \, {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + 6 \, c d^{2} {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (f x + e\right )}{{\left (a - \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 6 \, c^{2} d {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - \frac {2 \, c^{3} \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{2 \, f} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="max 
ima")
 
output
-1/2*(d^3*(2*(sin(f*x + e)/(cos(f*x + e) + 1) - 3*sin(f*x + e)^3/(cos(f*x 
+ e) + 1)^3)/(a - 2*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e) 
^4/(cos(f*x + e) + 1)^4) - 3*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a + 
3*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a + 2*sin(f*x + e)/(a*(cos(f*x 
+ e) + 1))) + 6*c*d^2*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a - log(si 
n(f*x + e)/(cos(f*x + e) + 1) - 1)/a - 2*sin(f*x + e)/((a - a*sin(f*x + e) 
^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e) + 1)) - sin(f*x + e)/(a*(cos(f*x + 
e) + 1))) - 6*c^2*d*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a - log(sin( 
f*x + e)/(cos(f*x + e) + 1) - 1)/a - sin(f*x + e)/(a*(cos(f*x + e) + 1))) 
- 2*c^3*sin(f*x + e)/(a*(cos(f*x + e) + 1)))/f
 
3.3.11.8 Giac [A] (verification not implemented)

Time = 0.33 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.87 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {\frac {3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a} - \frac {3 \, {\left (2 \, c^{2} d - 2 \, c d^{2} + d^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a} + \frac {2 \, {\left (c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 3 \, c^{2} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a} - \frac {2 \, {\left (6 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 3 \, d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, c d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{2} a}}{2 \, f} \]

input
integrate(sec(f*x+e)*(c+d*sec(f*x+e))^3/(a+a*sec(f*x+e)),x, algorithm="gia 
c")
 
output
1/2*(3*(2*c^2*d - 2*c*d^2 + d^3)*log(abs(tan(1/2*f*x + 1/2*e) + 1))/a - 3* 
(2*c^2*d - 2*c*d^2 + d^3)*log(abs(tan(1/2*f*x + 1/2*e) - 1))/a + 2*(c^3*ta 
n(1/2*f*x + 1/2*e) - 3*c^2*d*tan(1/2*f*x + 1/2*e) + 3*c*d^2*tan(1/2*f*x + 
1/2*e) - d^3*tan(1/2*f*x + 1/2*e))/a - 2*(6*c*d^2*tan(1/2*f*x + 1/2*e)^3 - 
 3*d^3*tan(1/2*f*x + 1/2*e)^3 - 6*c*d^2*tan(1/2*f*x + 1/2*e) + d^3*tan(1/2 
*f*x + 1/2*e))/((tan(1/2*f*x + 1/2*e)^2 - 1)^2*a))/f
 
3.3.11.9 Mupad [B] (verification not implemented)

Time = 13.68 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.19 \[ \int \frac {\sec (e+f x) (c+d \sec (e+f x))^3}{a+a \sec (e+f x)} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (6\,c\,d^2-d^3\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (6\,c\,d^2-3\,d^3\right )}{f\,\left (a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-2\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\right )}+\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\left (c-d\right )}^3}{a\,f}+\frac {3\,d\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (2\,c^2-2\,c\,d+d^2\right )}{a\,f} \]

input
int((c + d/cos(e + f*x))^3/(cos(e + f*x)*(a + a/cos(e + f*x))),x)
 
output
(tan(e/2 + (f*x)/2)*(6*c*d^2 - d^3) - tan(e/2 + (f*x)/2)^3*(6*c*d^2 - 3*d^ 
3))/(f*(a - 2*a*tan(e/2 + (f*x)/2)^2 + a*tan(e/2 + (f*x)/2)^4)) + (tan(e/2 
 + (f*x)/2)*(c - d)^3)/(a*f) + (3*d*atanh(tan(e/2 + (f*x)/2))*(2*c^2 - 2*c 
*d + d^2))/(a*f)